home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global correctanim, masterlist, mastercounter, level1, kingcolor, NumofCol, origsprites, steplimit, mycolor, CurrentBug
- unLoad("bug" & CurrentBug & level1, ("bug" & CurrentBug & level1) + 2)
- set mycolor to 0
- puppetSprite(48, 0)
- cursor(-1)
- if level1 = 1 then
- set offset to 0
- set hinter to 1
- else
- set hinter to 2
- set offset to 10
- end if
- if correctanim = [] then
- set correctanim to [1, 2, 3, 4]
- end if
- set mycorrect to getAt(correctanim, random(count(correctanim)))
- deleteAt(correctanim, getPos(correctanim, mycorrect))
- play frame "L" & hinter & ".Correct" & mycorrect
- if level1 = 1 then
- set loopcounter to [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
- set holdme to []
- repeat with xxx = 1 to 4
- add(holdme, the castNum of sprite (xxx + 37))
- end repeat
- startTimer()
- set timelimit to the timer + 180
- set numberoftimes to 0
- puppetSound(0)
- puppetSound("rewsong" & random(3))
- repeat while the soundBusy of 1 or (numberoftimes < 5)
- set ptime to the timer
- repeat with xxx = 1 to NumofCol
- set counter to getAt(loopcounter, xxx)
- set dissprite to xxx + 37
- set holdlist to getAt(origsprites, xxx)
- set discan to getAt(holdlist, 1)
- set moveinfo to getAt(getAt(masterlist, offset + discan), counter)
- set the castNum of sprite dissprite to getAt(moveinfo, 1)
- set the locH of sprite dissprite to getAt(holdlist, 2) + getAt(moveinfo, 2)
- set the locV of sprite dissprite to getAt(holdlist, 3) + getAt(moveinfo, 3)
- if counter = getAt(steplimit, xxx) then
- setAt(loopcounter, xxx, 0)
- end if
- repeat while (the timer - ptime) < 5
- updateStage()
- end repeat
- end repeat
- if the mouseDown then
- exit repeat
- end if
- updateStage()
- set loopcounter to loopcounter + 1
- set numberoftimes to numberoftimes + 1
- end repeat
- puppetSound(0)
- repeat with xxx = 1 to NumofCol
- set dissprite to xxx + 37
- set holdlist to getAt(origsprites, xxx)
- set discan to getAt(holdlist, 1)
- set the castNum of sprite dissprite to getAt(holdme, xxx)
- set the locH of sprite dissprite to getAt(holdlist, 2)
- set the locV of sprite dissprite to getAt(holdlist, 3)
- end repeat
- updateStage()
- else
- repeat with xxx = 38 to 48
- puppetSprite(xxx, 0)
- end repeat
- play frame "tencansjump"
- end if
- puppetSound(0)
- puppetSprite(1, 0)
- play frame "Close.L" & hinter
- repeat with xxx = 38 to 47
- puppetSprite(xxx, 0)
- end repeat
- puppetSprite(37, 1)
- go("main")
- end
-